import { http } from '@/utils/http'

/**
 * 获取广告
 */
export const getAdvertise = (): Promise<IResData<IAdvData>> => {
  return http.get('/api/nongshang/adv')
}

/**
 * 看广告获取优惠券
 */
// eslint-disable-next-line camelcase
export const getAdCoupon = (adv_id: number): Promise<IResData<any>> => {
  // eslint-disable-next-line camelcase
  return http.post(`/api/nongshang/adv_coupon`, { adv_id }, { adv_id })
}
